package com.douyang.controller;

import cn.dev33.satoken.annotation.SaCheckRole;
import com.douyang.base.model.PageResult;
import com.douyang.base.model.Result;
import com.douyang.dto.GetOrderStatementLogDTO;
import com.douyang.service.OrderStatementLogService;
import com.douyang.vo.OrderStatementLogVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xiaoma
 * @since 2025-04-23
 */
@RestController
@RequestMapping("/trade/orderStatementLog")
public class OrderStatementLogController {


    @Autowired
    private OrderStatementLogService orderStatementLogService;

    @SaCheckRole("admin")
    @PostMapping("/getOrderStatementLog")
    public Result<PageResult<OrderStatementLogVO>> getOrderStatementLog(@RequestBody GetOrderStatementLogDTO getOrderStatementLogDTO) {
        return Result.success(orderStatementLogService.getOrderStatementLog(getOrderStatementLogDTO));
    }
}
